package com.qfmy.web.enmu;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;


/**
 * @author: 廖志伟
 * @date: 2024-11-28
 * @description: 响应码枚举
 */
@SuppressWarnings("all")
@AllArgsConstructor
@NoArgsConstructor
public enum ResultCode {
    SUCCESS(200, "成功"),
    FAIL(201, "失败"),
    PARAM_ERROR(202, "参数不正确"),
    SERVICE_ERROR(203, "服务异常"),
    DATA_ERROR(204, "数据异常"),
    ILLEGAL_REQUEST(205, "非法请求"),
    REPEAT_SUBMIT(206, "重复提交"),

    ACCOUNT_EXIST_ERROR(301, "账号已存在"),
    ACCOUNT_NOT_EXIST_ERROR(302, "账号不存在"),
    PASSWORD_ERROR(304, "密码错误"),
    CAPTCHA_CODE_ERROR(305, "验证码错误"),
    CAPTCHA_CODE_EXPIRED(306, "验证码已过期"),
    CAPTCHA_CODE_NOT_FOUND(307, "未输入验证码"),

    TOKEN_EXPIRED(601, "token过期"),
    TOKEN_NOT_FOUND(602, "token不存在"),
    TOKEN_INVALID(603, "token非法");

    //响应状态码
    private   Integer code;
    //响应信息
    private  String message;

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
